package com.tencent.yolov5ncnn

import android.content.Intent
import android.os.Bundle
import android.view.animation.AlphaAnimation
import android.view.animation.Animation
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity

class TurnOnScreen : AppCompatActivity() {
//    private var welcomeImg: ImageView? = null
//
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_turn_on_screen) // This is the XML layout file corresponding to the newly created empty Activity
//
//        supportActionBar?.hide() // Hide the Activity title bar
//
//        welcomeImg = findViewById(R.id.wrap)
//        val anima = AlphaAnimation(0.3f, 1.0f).apply {
//            duration = 3000 // Set the duration for the simple animation
//        }
//        welcomeImg?.startAnimation(anima)
//        anima.setAnimationListener(AnimationImpl())
//    }
//
//    private inner class AnimationImpl : Animation.AnimationListener {
//        override fun onAnimationStart(animation: Animation) {
//            welcomeImg?.setBackgroundResource(R.drawable.yw) // This is the image displayed during the app startup, yw is the image name, pay attention to this as it is a common mistake
//        }
//
//        override fun onAnimationEnd(animation: Animation) {
//            skip() // Navigate to another page after the animation ends
//        }
//
//        override fun onAnimationRepeat(animation: Animation) {
//        }
//    }
//
//    private fun skip() {
//        startActivity(Intent(this, MainActivity::class.java)) // Return to the main interface of the app after the splash screen
//        finish() // End the splash screen Activity process
    }
}